|
|
|
|
|
|
|
Figure 10.5.
Finishing the Connection definition
process by testing the connection. |
|
|
|
|
|
|
|
|
If the test passed, click Finish to return to the ADODC properties dialog. You should now see the connection information in the dialog. The next and last step is to specify the SQL statement that will be used by the connection as the record source. Click the RecordSource tab, enter the SQL statement shown in Figure 10.6, and then click OK to save the changes. |
|
|
|
|
|
|
|
|
Figure 10.6.
Adding the SQL query to the ADO
connection information. |
|
|
|
|
|
|
|
|
Once the connection is defined, you can set the DataSource and DataField properties for the Textbox, as shown in Table 10.1. The last step is to add the following code to the command buttons allowing you to navigate the SQL statement: |
|
|
|
|
|
|
|
|
Private Sub cmNext_Click()
adcBooks.Recordset.MoveNext
End Sub
|
|
|
|
|
|